﻿#region Copyrights Notice
//©2010 Microsoft Corporation. All rights reserved.
#endregion

#region usings
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#endregion

namespace Microsoft.InformationSecurity.CISF.SecurityPortal.Data
{
    public class AuditTrail : IDisposable
    {
        private string _Message;
        private long _StartTicks;
        public AuditTrail(string userName, string message)
        {
            this._Message = userName + '\t' + message;
            this._StartTicks = DateTime.Now.Ticks;
        }
        #region IDisposable Members

        void IDisposable.Dispose()
        {
            //Write to Audit table.
            string msg = this._Message + '\t' + TimeSpan.FromTicks(DateTime.Now.Ticks - this._StartTicks).TotalSeconds.ToString();
            //EntLibHelper.PerformanceLog(msg);
            System.Diagnostics.Debug.WriteLine(msg);
        }

        #endregion

    }
}
